package com.muchfish.reactor.api;

import reactor.core.publisher.Flux;

public class ReactorCombineExample {
    public static void main(String[] args) {
        Flux<Integer> source1 = Flux.range(1, 3);
        Flux<Integer> source2 = Flux.range(4, 3);

        // 合并两个数据流
        Flux<Integer> merged = Flux.concat(source1, source2);

        merged.subscribe(System.out::println); // 输出: 1, 2, 3, 4, 5, 6
    }
}

